SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO



ALTER    VIEW dbo.v_Td_Account
AS
SELECT a.accid,a.code,a.name,a.bankid,a.subjectid,a.moneyid,a.[pause],a.cash,a.start,a.balance,a.balinit,a.filid
  , a.lowamt,a.topamt
  , m.name AS moneyname, f.FI_FilNM, k.kname
  , b.bankname,b.accountno bankno,b.apptype,b.appid,b.appkey,b.apptoken
FROM dbo.td_account a 
  LEFT OUTER JOIN dbo.td_money m ON a.moneyid = m.moneyid 
  LEFT OUTER JOIN dbo.td_filiale f ON a.filid = f.FI_FilID 
  LEFT OUTER JOIN dbo.ts_kind k ON a.cash = k.kid
  Left Join td_bank b on b.bankid=a.bankid
WHERE (k.kind = 5107)



GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

